<!DOCTYPE html>
<html {{ HTML_ATTRS }}>

<head {{ HEAD_ATTRS }}>
  {{ HEAD }}
</head>

<body {{ BODY_ATTRS }}>
  <style type="text/css">
    .lowie {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 999;
    }

    .lowie .bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #000;
      filter: opacity(60);
      opacity: .6;
    }

    .lowie .con {
      box-sizing: border-box;
      padding: 30px 20px;
      position: absolute;
      width: 400px;
      height: 200px;
      top: 50%;
      left: 50%;
      margin-left: -200px;
      margin-top: -100px;
      text-align: center;
      background: #fff;
    }

    .lowie h2 {
      margin: 10px 0 30px 0;
      line-height: 1.8em;
    }

    .lowie a {
      color: #fea05a;
      font-size: 14px;
      text-decoration: none;
      display: block;
      background-color: #fea05a;
      color: #fff;
      height: 36px;
      line-height: 36px;
      text-align: center;
      width: 150px;
      margin: 0 auto;
      border-radius: 4px;
    }

    .lowie a:hover {
      text-decoration: underline;
    }
  </style>
  <div id="J_lowie" class="lowie" style="display: none;">
    <div class="bg"></div>
    <div class="con">
      <h2>您的浏览器版本过低，为了更好的浏览体验，建议您升级浏览器</h2>
      <a href="http://browsehappy.osfipin.com/" target="_blank">去升级浏览器</a>
    </div>
  </div>
  <script>
    // 判断IE
    function isIE() {
      var userAgent = navigator.userAgent //取得浏览器的userAgent字符串
      var isIE = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1 //判断是否IE<11浏览器
      var isEdge = userAgent.indexOf('Edge') > -1 && !isIE //判断是否IE的Edge浏览器
      var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1
      if (isIE) {
        var reIE = new RegExp('MSIE (\\d+\\.\\d+);')
        reIE.test(userAgent)
        var fIEVersion = parseFloat(RegExp['$1'])
        if (fIEVersion === 7) {
          return 7
        } else if (fIEVersion === 8) {
          return 8
        } else if (fIEVersion === 9) {
          return 9
        } else if (fIEVersion === 10) {
          return 10
        } else {
          return 6//IE版本<=7
        }
      } else if (isEdge) {
        return 'edge'//edge
      } else if (isIE11) {
        return 11 //IE11
      } else {
        return -1//不是ie浏览器
      }
    }
    function detectIE() {
      var ua = window.navigator.userAgent

      // Test values; Uncomment to check result …

      // IE 10
      // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';

      // IE 11
      // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';

      // Edge 12 (Spartan)
      // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';

      // Edge 13
      // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';

      var msie = ua.indexOf('MSIE ')
      if (msie > 0) {
        // IE 10 or older => return version number
        return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10)
      }

      var trident = ua.indexOf('Trident/')
      if (trident > 0) {
        // IE 11 => return version number
        var rv = ua.indexOf('rv:')
        return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10)
      }

      var edge = ua.indexOf('Edge/')
      if (edge > 0) {
        // Edge (IE 12+) => return version number
        return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10)
      }

      // other browser
      return false
    }
    // alert(detectIE())
    if (detectIE() !== false && detectIE() <= 9) {
      document.getElementById('J_lowie').style.display = 'block'
    }
  </script>
  {{ APP }}
</body>

</html>